package com.lucifer.cloud.boot.blog.chat.scheduler;

import com.lucifer.cloud.boot.blog.chat.service.DocService;
import lombok.RequiredArgsConstructor;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@EnableScheduling
@Component
@RequiredArgsConstructor
public class DocScanScheduler {

    private final DocService docService;

    @Scheduled(fixedRate = 1000 * 60 * 60 * 6)
    public void scan() {
        docService.loadData();
    }
}
